﻿@model IEnumerable<PNProject.Core.LibModel>
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/AdminLayout.cshtml";
    int active = Convert.ToInt16(ViewData["page-active"]);
    int total = (int)(ViewData["page-total"]);
    List<int> listPage = (List<int>)(ViewData["page-list"]);
}

<div class="admin_head">
Thư viện
</div>

<div class="admin_content">

<a class="newobject" href="/AdminLibraries/Create">Tạo mới</a>
 <br />
  <br />
<div style="color:Red; margin-bottom:10px;">Tổng số mục: (@total)</div>

@foreach (var item in Model)
{
<div class="item-div">
@if (item.Type==0)
{
<img src="/Images/file_icon.png" style="margin-right:10px; width:12px; height:12px;"/>
}
else
{
<img src="/Images/youtube_icon.jpg" style="margin-right:10px; margin-bottom:-1px; width:12px; height:12px;"/>
}
<a class="item-delete" href="/AdminLibraries/Delete/@item.ElementID.ToString()" onclick="return confirmAction()">Xóa</a>
<a class="item-link" href="/AdminLibraries/Detail/@item.ElementID.ToString()">@item.Title</a>
</div>
}
<hr />
@foreach (var item in listPage)
{
    if (item == active)
    {
    <a class="active_page_link" href="/AdminEmail/index/?p=@item.ToString()"><span>@item.ToString() </span></a>
    }
    else
    {
    <a class="page_link" href="/AdminEmail/index/?p=@item.ToString()"><span>@item.ToString() </span></a>
    }
}
</div>
